/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.chlitina.store.modules.employee.entity;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import com.chlitina.store.common.persistence.BaseEntity;

/**
 * 员工结算单明细Entity
 * @author liujiang
 * @version 2013-11-21
 */
@Entity
@Table(name = "store_employee_accounting_detail")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class StoreEmployeeAccountingDetail extends BaseEntity {
	
	private static final long serialVersionUID = 1L;
	private Long id; 		// 编号
	private StoreEmployeeAccounting storeEmployeeAccounting; 	// 员工结算单编号
	private Employee employee;		//员工编号
	private String title;    	//员工职务（冗余字段，便于查询和记录历史数据）
	private float base_salary; 	// 基本工资
	private float new_card_bonus;	// 新开卡提成
	private float product_sale_bonus;	// 产品销售提成
	private float do_care_bonus;	// 手工护理提成
	private float recharge_card_bonus;	//卡充值提成
	private float float_salary;	// 浮动工资
	private float total;	// 合计薪资 (冗余字段)
	private String remark;	// 备注信息

	public StoreEmployeeAccountingDetail() {
	}

	public StoreEmployeeAccountingDetail(Long id){
		this();
		this.id = id;
	}
	
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(cascade={CascadeType.REFRESH}, fetch = FetchType.LAZY) 
	@JoinColumn(name="SEA_ID")
	@NotFound(action = NotFoundAction.IGNORE)
	@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
	@NotNull
	public StoreEmployeeAccounting getStoreEmployeeAccounting() {
		return storeEmployeeAccounting;
	}

	public void setStoreEmployeeAccounting(
			StoreEmployeeAccounting storeEmployeeAccounting) {
		this.storeEmployeeAccounting = storeEmployeeAccounting;
	}

	@ManyToOne(cascade={CascadeType.REFRESH}, fetch = FetchType.LAZY) 
	@JoinColumn(name="EMPLOYEE_ID")
	@NotFound(action = NotFoundAction.IGNORE)
	@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
	@NotNull
	public Employee getEmployee() {
		return employee;
	}

	public void setEmployee(Employee employee) {
		this.employee = employee;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public float getBase_salary() {
		return base_salary;
	}

	public void setBase_salary(float base_salary) {
		this.base_salary = base_salary;
	}

	public float getNew_card_bonus() {
		return new_card_bonus;
	}

	public void setNew_card_bonus(float new_card_bonus) {
		this.new_card_bonus = new_card_bonus;
	}

	public float getProduct_sale_bonus() {
		return product_sale_bonus;
	}

	public void setProduct_sale_bonus(float product_sale_bonus) {
		this.product_sale_bonus = product_sale_bonus;
	}

	public float getDo_care_bonus() {
		return do_care_bonus;
	}

	public void setDo_care_bonus(float do_care_bonus) {
		this.do_care_bonus = do_care_bonus;
	}

	public float getRecharge_card_bonus() {
		return recharge_card_bonus;
	}

	public void setRecharge_card_bonus(float recharge_card_bonus) {
		this.recharge_card_bonus = recharge_card_bonus;
	}

	public float getFloat_salary() {
		return float_salary;
	}

	public void setFloat_salary(float float_salary) {
		this.float_salary = float_salary;
	}

	public float getTotal() {
		return total;
	}

	public void setTotal(float total) {
		this.total = total;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
}


